import QtQuick 2.0
import QtQuick.Layouts 1.1
Rectangle{

    property int centerX: 0
    property int centerY: 0
    property string fileNameold
    property string fileNamenew
    property double value: 0   // 0 - 360
    property bool repeat: false
    property alias mouseA: mouseA
    id:btn
    Layout.alignment: Qt.AlignCenter
    width: 60
    height: 60
    color: "transparent"
    visible: true
    Image {
        id: img
        width: parent.width
        height: parent.height
        source: fileNameold
        anchors.fill: parent
        fillMode: Image.Stretch

        transformOrigin: Item.Center
    }
    MouseArea {
        id:mouseA

        anchors.fill: parent
        onPressed:{
            img.source = fileNamenew
        }
        onReleased: {
            img.source = fileNameold
        }

    }
}
